<style>
    .layui-select-title {
        width: 80%;
    }

    .layui-input-block {
        margin-left: 10% !important;
    }

    xm-select {
        margin-left: 21%;
    }

    .layui-form-label {
        width: 79px !important;
    }
</style>
<form id="categroy_tag" style="margin-top: 15px;" action="{{route('admin.category.update.attach',['id'=>$info['id']])}}"
      class="layui-form">
    {{csrf_field()}}

    <div class="layui-form-item">
        <label class="layui-form-label">考试标签</label>
        <div class="layui-input-block" style="width: 68%">
            <div id="exam"></div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">课程标签</label>
        <div class="layui-input-block" style="width: 68%">
            <div id="course"></div>
        </div>
    </div>
</form>
<script src="{{asset('layui/modules/xm-select.js')}}"></script>
<script src="{{asset('js/tree/select.js')}}"></script>
<script>
    layui.use(['xmSelect'], function () {
        var xmSelect = layui.xmSelect;
        let course = selectTreeMoreParams('#course', '请选择', "", JSON.parse('{!! $tags !!}'), 'data[course]',(res)=>{});
        xmSelect.render(course)

        let exam = selectTreeParams('#exam', 'data[exam]', '请选择', "{!! $examNum !!}", JSON.parse('{!! $tags !!}'), (res) => {});
        xmSelect.render(exam)
    });
</script>
